package test6_8;

public class Solution {


    public   int maxVowels(String s,int k){
        int ans=0;
        int len = s.length();
        for (int i = 0; i <=len-k ; i++) {
            String s1 = s.substring(i, i + k);
            int i1 = find(s1);
            ans=Math.max(i1,ans);
        }
        return  ans;
    }
    public  int find(String s){
        int ans=0;
        for (int i = 0; i < s.length(); i++) {
            char c = s.charAt(i);
            switch (c){
                case 'a': ans++;break;
                case 'e':ans++;break;
                case 'i':ans++;break;
                case 'o':ans++;break;
                case 'u':ans++;break;
                default:break;
            }
        }
        return ans;
    }

    public static void main(String[] args) {
        Solution solution = new Solution();
        System.out.println(solution.maxVowels("aeiou", 2));
    }
}
